using System;
using System.Collections.Generic;
using Castle.ActiveRecord;
using Karma.Framework.Core.Domain;

namespace Karma.Framework.Core.Metadata.Mapping
{
    [ActiveRecord("Vista")]
    public class View : DomainObject
    {
        [JoinedKey]
        public override Int64 Id { get; set; }

        [Property(NotNull = true)]
        public string Description { get; set; }

        [Property(NotNull = true)]
        public string Name { get; set; }

        [HasMany(typeof(Field), Cascade = ManyRelationCascadeEnum.All, Lazy = false,
            ColumnKey = "Vista", Table = "Campo", Inverse = true)]
        public IList<Field> Fields { get; set; }

    }
}